﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SimpleFactoryPattern
{
    public class Customer
    {
        public Food GetFood(string name)
        {

            Food food = null;
            if (name.Equals("鸡蛋西红柿"))
            {

            }
            else if (name.Equals("土豆炒肉"))
            {

            }

            return food;
        }

    }

    public abstract class Food
    {
        public abstract void Print();
    }
    public class EggTomatoFood : Food
    {
        public override void Print()
        {
            Console.WriteLine("这是食物鸡蛋西红柿！");
        }
    }
    public class PotatoMeatFood : Food
    {
        public override void Print()
        {
            Console.WriteLine("这是食物土豆炒肉!");
        }
    }


}
